<template>
  <div>
    <el-card shadow="never" class="mb-20">
      <div slot="header" class="clearfix">
        <span>基础信息</span>
      </div>
      <el-form ref="form" :model="form" label-width="120px">
        <el-form-item label="项目类型" required>
          <el-radio-group v-model="form.type">
            <el-radio label="工程类" name="type"></el-radio>
            <el-radio label="工物资备件" name="type"></el-radio>
            <el-radio label="服务类" name="type"></el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="物料分类" required>
          <el-cascader
            class="w100"
            :options="options"
            :props="props"
            clearable
          ></el-cascader>
        </el-form-item>
        <el-form-item label="采购类型" required>
          <el-radio-group v-model="form.type">
            <el-radio :label="1">一单一采</el-radio>
            <el-radio :label="2">长协采购</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="招标项目编号">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item label="项目名称">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item label="采购项目编号">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item label="预算总价">
          <el-row :gutter="10">
            <el-col :span="8">
              <el-input v-model="form.desc"></el-input>
            </el-col>
            <el-col :span="4">元</el-col>
          </el-row>
        </el-form-item>
        <el-form-item label="采购单位">
          <el-select v-model="form.purchaseCom"></el-select>
        </el-form-item>
      </el-form>
    </el-card>

    <el-card shadow="never" class="mb-20">
      <div slot="header" class="clearfix">
        <span>物料明细</span>
      </div>
      <el-table :data="list" border>
        <el-table-column
          label="序号"
          type="index"
          width="60"
          align="center"
        ></el-table-column>
        <el-table-column label="物料编码"></el-table-column>
        <el-table-column label="物料名称"></el-table-column>
        <el-table-column label="规格型号"></el-table-column>
        <el-table-column label="采购数量"></el-table-column>
        <el-table-column label="计量单位"></el-table-column>
        <el-table-column label="预算单价"></el-table-column>
        <el-table-column label="期望交货日期" width="150"></el-table-column>
        <el-table-column label="使用部门"></el-table-column>
        <el-table-column label="联系人"></el-table-column>
        <el-table-column label="联系电话"></el-table-column>
        <el-table-column label="操作">
          <template>
            <el-button type="danger" icon="el-icon-delete">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        purchaseCom: "",
      },
      list: [],
      props: { multiple: true },
      options: [
        {
          value: 1,
          label: "东南",
          children: [
            {
              value: 2,
              label: "上海",
              children: [
                { value: 3, label: "普陀" },
                { value: 4, label: "黄埔" },
                { value: 5, label: "徐汇" },
              ],
            },
            {
              value: 7,
              label: "江苏",
              children: [
                { value: 8, label: "南京" },
                { value: 9, label: "苏州" },
                { value: 10, label: "无锡" },
              ],
            },
            {
              value: 12,
              label: "浙江",
              children: [
                { value: 13, label: "杭州" },
                { value: 14, label: "宁波" },
                { value: 15, label: "嘉兴" },
              ],
            },
          ],
        },
        {
          value: 17,
          label: "西北",
          children: [
            {
              value: 18,
              label: "陕西",
              children: [
                { value: 19, label: "西安" },
                { value: 20, label: "延安" },
              ],
            },
            {
              value: 21,
              label: "新疆维吾尔族自治区",
              children: [
                { value: 22, label: "乌鲁木齐" },
                { value: 23, label: "克拉玛依" },
              ],
            },
          ],
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
</style>